package org.circedroid.core;

public class LGO{
	private int unit;
	private double value;
	private String nom;
	public LGO(int unit, double value, String nom){
		this.unit=unit;
		this.value=value;
		this.nom=nom;
	}

	public double getValue(){
		double retour=0;
		switch (this.unit) {
		case 1:
			retour=this.value;
			break;

		case 10:
			long deg;
			long min;
			double sec;
			deg=(long)this.value;
			min=(long)((this.value-(double)deg)*100);
			sec=((this.value-(double)deg)*100-(double)min)*100.0;
			retour=(double)deg+(double)min/60.0+sec/3600.0;
			retour=retour*Math.PI/180.0;
			break;
		}
		return retour;}
	public String getNom(){return this.nom;}
}